package cn.com.generaldata.os.service.indicator_evaluation.change_analysis;

import org.apache.commons.lang3.Validate;

import cn.com.generaldata.jsme_indicator_system.entity.IndicatorEvaluation;
import cn.com.generaldata.os.service.indicator_constant.ProvinceIndicatorConstant;
import cn.com.generaldata.os.service.indicator_evaluation.IndicatorEvaluationCalculateService;
import cn.com.generaldata.os.vo.IndicatorAccountVO;

/**
 * 地区生产总值增长速度评估指标计算类.
 */
public class GDPSpeedCalculateService extends IndicatorEvaluationCalculateService {

	private String GDPGrowthRateIndicatorName = ProvinceIndicatorConstant.GDP_GROWTH_RATE_INDICATOR_NAME;

	@Override
	protected Double calculate(IndicatorEvaluation indicator, IndicatorAccountVO indicatorAccountVO) {
		Double result = getInputOrAccountingIndicatorValue(indicatorAccountVO, indicatorAccountVO.getYear(),
				GDPGrowthRateIndicatorName);

		Validate.isTrue(result != null);

		return result;
	}

}
